package com.isoft.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.xml.bind.annotation.*;
import lombok.Data;

@Data
@XmlRootElement(name = "MSG")
@XmlAccessorType(XmlAccessType.FIELD)
public class DfmeCkoeEntity {
    @JsonProperty("meta")
    @XmlElement(name = "META")
    private Meta meta;

    @JsonProperty("dflt")
    @XmlElement(name = "DFLT")
    private Dflt dflt;

    private Long msgId;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Meta {
        @XmlElement(name = "SNDR")
        private String sender;
        @XmlElement(name = "RCVR")
        private String receiver;
        @XmlElement(name = "SEQN")
        private Long sequenceNumber;
        @XmlElement(name = "DDTM")
        private String dateTime;
        @XmlElement(name = "TYPE")
        private String type;
        @XmlElement(name = "STYP")
        private String subType;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Dflt {
        @XmlElement(name = "FLID")
        private Long flightId;
        @XmlElement(name = "FFID")
        private String flightFileId;
        @XmlElement(name = "FIDE")
        private String flightIdentifier;
        @XmlElement(name = "FATT")
        private String flightAttribute;
        @XmlElement(name = "STAT")
        private String status;
        @XmlElement(name = "ISTA")
        private String internalStatus;
        @XmlElement(name = "FCRE")
        private String flightCreateTime;
        @XmlElement(name = "MSTA")
        private String manualStatus;
        @XmlElement(name = "MIST")
        private String manualInternalStatus;
        @XmlElement(name = "MCRE")
        private String manualCreateTime;

        public Long getFlightId() { return flightId; }
        public void setFlightId(Long flightId) { this.flightId = flightId; }
        public String getStatus() { return status; }
        public void setStatus(String status) { this.status = status; }
    }

    public Meta getMeta() {
        return meta;
    }

    public void setMeta(Meta meta) {
        this.meta = meta;
    }

    public Dflt getDflt() {
        return dflt;
    }

    public void setDflt(Dflt dflt) {
        this.dflt = dflt;
    }

    public Long getMsgId() {
        return msgId;
    }

    public void setMsgId(Long msgId) {
        this.msgId = msgId;
    }
}